# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=py3-distlib
pkgver=0.3.1
pkgrel=1
pkgdesc="Distribution utilities"
options="!check" # 1 test in tests/test_locator.py fails
url="https://bitbucket.org/pypa/distlib"
arch="noarch"
license="PSF-2.0"
depends="python3"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/d/distlib/distlib-$pkgver.zip"
builddir="$srcdir/distlib-$pkgver"

prepare() {
	default_prepare
	rm distlib/*.exe
}

build() {
	python3 setup.py build
}

check() {
	PYTHONHASHSEED=0 python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="4c004b09eb93a6bfdd8b9b58175b756aa376c45fdef43a362a52fbffa19feef4850f0eb0f958bbf1eb9d2b8bfc1fc8a67c5b926d954e934c777b5c8b5c18e9d4  distlib-0.3.1.zip"
